home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Netherlands - A Compact World
/
The Netherlands.iso
/
chapters
/
4.1.5.dxr
/
Internal_2_V2 tekstimport met MAC, MacChars, Edit, Tekstkleur.ls
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
2004-06-10
|
1.4 KB
|
43 lines
property spriteNum
global taalkeuze, maclist, tekstkleur
on vertalen me
sprite(spriteNum).visibility = 0
if tekstkleur = VOID then
sprite(spriteNum).member.foreColor = 235
else
sprite(spriteNum).member.foreColor = tekstkleur
end if
if taalkeuze = VOID then
taalkeuze = "nl"
end if
tekstpad = "@txt:" & taalkeuze & ":"
fieldnaam = sprite(spriteNum).member.name
bestandnaam = fieldnaam & ".txt"
buffer = new(xtra("fileio"))
openFile(buffer, tekstpad & bestandnaam, 1)
setPosition(buffer, 0)
bufferinhoud = readFile(buffer)
closeFile(buffer)
tellertje = 1
repeat while line tellertje of bufferinhoud > EMPTY
repeat with Tellertje8 = 1 to (line tellertje of bufferinhoud).length
if char Tellertje8 of line tellertje of bufferinhoud = numToChar(10) then
put EMPTY into char Tellertje8 of line tellertje of bufferinhoud
end if
if (char Tellertje8 of line tellertje of bufferinhoud).charToNum > 127 then
if the platform contains "Mac" then
put numToChar(maclist[(char Tellertje8 of line tellertje of bufferinhoud).charToNum - 127]) into char Tellertje8 of line tellertje of bufferinhoud
end if
end if
end repeat
tellertje = tellertje + 1
end repeat
put bufferinhoud into member fieldnaam
sprite(spriteNum).visibility = 1
end
on beginSprite me
sendSprite(spriteNum, #vertalen)
end